package com.wiscamp.ninechapters.problems.infrastructure.mappers.statistics;

import com.wiscamp.ninechapters.problems.infrastructure.po.statistics.MenteeKnowledgeMapPO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface MenteeKnowledgeMapMapper extends JpaRepository<MenteeKnowledgeMapPO, Long>, JpaSpecificationExecutor<MenteeKnowledgeMapPO> {

    @Query("select e from MenteeKnowledgeMapPO e where e.userId = :userId and e.subjectPointId = :pointId")
    MenteeKnowledgeMapPO findMenteeKnowledgeMap(long userId, long pointId);
}